<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="referrer" content="no-referrer">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>网络收藏夹|管理员列表</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/admin_account.css">
</head>
<body>
<!-- HTML -->
<div class="main" id="main">
    <blockquote class="layui-elem-quote">管理员列表</blockquote>
    <div class="search-div">
        <label for="searchName">搜索：</label>
        <input class="layui-input" id="searchName" placeholder="请输入用户名、昵称或邮箱" autocomplete="off">
        <button type="button" class="layui-btn layui-btn-sm" id="search">查询</button>
        <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" id="addBtn">新增</button>
    </div>
    <!-- 数据表格 -->
    <table id="accountList" lay-filter="accountList"></table>
    <!-- 操作 -->
    <script type="text/html" id="operates">
        <a class="layui-btn layui-btn-xs" lay-event="enable">启用</a>
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="update">编辑</a>
        <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="reset">重置密码</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
</div>
<!-- 添加管理员表单 -->
<form class="layui-form" action="" id="add-admin" lay-filter="add-admin"
      style="display: none;padding: 10px 20px 10px 10px">
    <div class="layui-form-item">
        <label class="layui-form-label">账号</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="username" required lay-verify="required|username" placeholder="请输入账号"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="password" name="password" required lay-verify="required|password" placeholder="请输入密码"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="email" required lay-verify="required|email|exitEmail" placeholder="请输入邮箱" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="nickName" required lay-verify="required" placeholder="请输入姓名"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="addAdmin">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" id="cancelAddAdmin">取消</button>
        </div>
    </div>
</form>
<!-- 修改管理员表单 -->
<form class="layui-form" action="" id="update-admin" lay-filter="update-admin"
      style="display: none;padding: 10px 20px 10px 10px">
    <input type="hidden" name="id">
    <div class="layui-form-item">
        <label class="layui-form-label">账号</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="username" required lay-verify="required" placeholder="请输入账号"
                   autocomplete="off" class="layui-input layui-disabled" disabled>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="email" required lay-verify="required|email" placeholder="请输入邮箱" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline" style="width: 210px;">
            <input type="text" name="nickName" required lay-verify="required" placeholder="请输入姓名"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="updateAdmin">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" id="cancelUpdateAdmin">取消</button>
        </div>
    </div>
</form>
<script src="js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/common.js"></script>
<script src="layui/layui.js"></script>
<script src="plugin/md5.min.js"></script>
<script src="js/admin_account.js"></script>
</body>
</html>